package com.ruoyi.bom.controller;

import com.ruoyi.bom.domain.TqlStapInChange;
import com.ruoyi.bom.domain.TqlStapOutChange;
import com.ruoyi.bom.service.TqlStapInChangeService;
import com.ruoyi.bom.service.TqlStapOutChangeService;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;

import java.util.Calendar;
import java.util.List;
import java.util.Map;

@RestController
@Api(tags = "库存台账-用料查询")
@RequestMapping("/stap/outchange")
public class TqlStapOutChangeController extends BaseController {

    @Autowired
    private TqlStapOutChangeService tqlStapOutChangeService;

    @RequiresPermissions("stap:outchange:all")
    @ApiOperation("分页")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "date", value  = "日期", paramType = "query", dataType = "string"),
        @ApiImplicitParam(name = "stapCode", value = "操作人", paramType = "query", dataType = "string"),
        @ApiImplicitParam(name = "stapName", value = "单据编号", paramType = "query", dataType = "string")

    })
    @GetMapping("/page")
    public TableDataInfo list(@ApiIgnore @RequestParam Map<String, Object> params) {
        startPage();
        List<TqlStapOutChange> list = tqlStapOutChangeService.selectList(params);
        return getDataTable(list);
    }

}
